create-skill: quote argument-hint to keep it a YAML string#98
Open
thejesh23 wants to merge 1 commit into
Open
Conversation
Copilot CLI 1.0.65 requires the SKILL.md `argument-hint` frontmatter field to be a string. An unquoted `[skill-name (optional)]` value is parsed by YAML as a flow sequence, which breaks skill loading in the new release. Wrap the value in double quotes so it parses as a plain string, matching the string form used by the other SKILL.md files in this repo.
|
💚 CLA has been signed |
Author
|
Tracking issue: #99 — captures the bug diagnosis and reproducer separately for anyone searching the repo who lands there before this PR. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
.claude/skills/create-skill/SKILL.mdhas:Copilot CLI 1.0.65 tightened SKILL.md frontmatter parsing and now requires
argument-hintto be a string. YAML parses the unquoted[...]value as a flow sequence (a list), which breaks skill loading under the new release.Fix: wrap the value in double quotes so it parses as a plain string.
This is also latent on Claude Code, tracked in anthropics/claude-code#22161.
YAML rule
Any
argument-hintvalue whose first non-whitespace character is[must be quoted, otherwise YAML treats it as a sequence. Two safe forms:argument-hint: "[foo]"— string containing bracketsargument-hint: "foo"— plain string (drop the brackets entirely)Scope of changes in this repo
I scanned every
SKILL.mdin the tree. Only one file has the bug:.claude/skills/create-skill/SKILL.mdAll other
SKILL.mdfiles use angle-bracket placeholders (<file-or-directory>, etc.) or already-quoted strings, which are safe.Note:
README.mdandCONTRIBUTING.mdshowargument-hint: [args]andargument-hint: <args>as documentation examples of the frontmatter schema, not as live frontmatter that gets parsed. I left the docs alone in this PR to keep the change minimal, but happy to follow up with a docs tweak that recommends the quoted form if you'd like.Test plan
python3 -c "import yaml; yaml.safe_load(open('.claude/skills/create-skill/SKILL.md').read().split('---')[1])"returnsargument-hintas a Pythonstr, not alist, after the change.\"quotes) — no behavior change beyond frontmatter typing.validate-skills.yml) passes on the PR.